<?php
    $CI=& get_instance();
    print_r($CI->session->userdata('test'));
    if($CI->session->userdata('test')!=null)
    {
        echo 'ok';
    }
    else
    {
        echo 'no';
    }
?>
